package main

import (
	"codejy/command"
	_ "codejy/run"
	"codejy/store"
	"fmt"
	"os"
	"os/signal"
	"syscall"
)

var codeLine string //行代码执行

var load []string

func main() {
	signalChannel := make(chan os.Signal)
	signal.Notify(signalChannel, os.Interrupt, syscall.SIGTERM, syscall.SIGINT, syscall.SIGKILL)
	go func() {
		<-signalChannel
		fmt.Println("程序被中断......")
		os.Exit(1)
	}()
	fmt.Println("简易语言")
	fmt.Println("作者:胡安民")
	fmt.Println("邮箱:3426154361@qq.com")
	//创建主线程环境
	_, threadStore := store.CreateThread()
	store.MainThreadStore = threadStore
	//解析参数
	command.ExecuteCommand(threadStore)

}
